package top.hitotright.springmemo.model;


import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.util.Date;


@Entity
@Table( name = "Users" )
public class User {
    private int userId;
    private String userName;
    private String email;
//    private Date addTime;

    public User(String userName, String email){
        super();
        this.email = email;
        this.userName = userName;
//        this.addTime = new Date();
    }

    public User(){
        super();
    }

    @Id
    @GeneratedValue(generator = "increment")
    @GenericGenerator(name = "increment",strategy = "increment")
    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

//    @Temporal(TemporalType.TIMESTAMP)
//    @Column(name = "addTime")
//    public Date getAddTime() {
//        return addTime;
//    }
}
